package top.lilele.adminSystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import top.lilele.adminSystem.dto.UserMenuDto;
import top.lilele.adminSystem.entity.AdminResourceEntity;

import java.util.List;

/**
 * @Author: li.leLe
 * @Date: 2021/7/30 17:19
 */
@Mapper
public interface AdminResourceMapper extends BaseMapper<AdminResourceEntity> {
    /**
     * 查询当前用户对应的角色的菜单与api列表
     *
     * @param userId   用户id
     * @param menuType 类型 0 菜单  1 api
     * @return
     */
    List<UserMenuDto> selectMenuListByRoleAndUserId(@Param(value = "userId") String userId, @Param("menuType") Integer menuType);
}
